
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import '../../../utils/img_util.dart';
import '../../../value/topcolors.dart';

class MeCell extends StatelessWidget {
  const MeCell({
    Key? key,
    required this.icon,
    required this.title,
    this.content,
    this.onTap,
  }) : super(key: key);
  final String icon;
  final String title;
  final String? content;
  final VoidCallback? onTap;
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      child: Container(
        margin: EdgeInsets.fromLTRB(20.r, 0, 20.r, 10.r),
        child: Row(
          children: [
            loadImage(url: icon, width: 30.r, height: 30.r),
            SizedBox(
              width: 10.r,
            ),
            Expanded(
                child: Text(
              title,
              style: TextStyle(
                  color: TopColors.black_33,
                  fontSize: 15,
                  fontWeight: FontWeight.w400),
            )),
            Text(
              content ?? '',
              style: TextStyle(color: TopColors.black_99, fontSize: 12),
            ),
            Icon(
              Icons.play_arrow_rounded,
              size: 20.r,
              color: Colors.blue,
            )
          ],
        ),
        padding: EdgeInsets.symmetric(horizontal: 12.r),
        height: 50.r,
        decoration: BoxDecoration(
            color: Color(0xffF8F8F8), borderRadius: BorderRadius.circular(5.r)),
      ),
      onTap: onTap,
    );
  }
}
